<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/aftersaleinfo/q_serve/q_serve.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/aftersaleinfo/q_serve/q_serve.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Serve',
                footer: "Foots",
                cnName: '服务',
                name: 'q_serve/q_serve',
                url: "/q_serve/",
                sortName: "CreateDate"
            });
            const editFormFields = ref({"Name":"","Classify":"","Attachment":"","Remark":""});
            const editFormOptions = ref([[{"title":"名称","required":true,"field":"Name","type":"text"},
                               {"dataKey":"服务分类","data":[],"title":"分类","required":true,"field":"Classify","type":"select"},
                               {"title":"附件","required":true,"field":"Attachment","type":"file"}],
                              [{"title":"备注","field":"Remark","colSize":8,"type":"textarea"}]]);
            const searchFormFields = ref({"Name":"","Classify":"","Creator":"","CreateDate":""});
            const searchFormOptions = ref([[{"title":"名称","field":"Name","type":"like"},{"dataKey":"服务分类","data":[],"title":"分类","field":"Classify","type":"select"},{"title":"创建人员","field":"Creator","type":"like"},{"title":"创建时间","field":"CreateDate","type":"datetime"}]]);
            const columns = ref([{field:'Name',title:'名称',type:'string',link:true,width:120,require:true,align:'left',sort:true},
                       {field:'Classify',title:'分类',type:'string',bind:{ key:'服务分类',data:[]},width:220,require:true,align:'left'},
                       {field:'CreateID',title:'创建人员id',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人员',type:'string',width:100,align:'left'},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'Serve',title:'ID',type:'guid',width:110,hidden:true,require:true,align:'left'},
                       {field:'Attachment',title:'附件',type:'file',width:110,require:true,align:'left'},
                       {field:'ModifyID',title:'修改人员id',type:'int',width:80,hidden:true,align:'left'},
                       {field:'Modifier',title:'修改人员',type:'string',width:130,hidden:true,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'Remark',title:'备注',type:'string',width:220,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
